import time
import _thread
import websocket
from maze import WebsocketConnector


def create_connector(url):
    print("create_connector ", url)
    connector = WebsocketConnector(url)


def main():
    # url = "ws://localhost:8080/p/" + str(1)
    # _thread.start_new_thread(create_connector, (url,))
    for i in range(2):
        url = "ws://localhost:8080/p/" + str(i)
        _thread.start_new_thread(create_connector, (url,))
    while True:
        time.sleep(2000)


if __name__ == '__main__':
    main()
